<?php
$this->breadcrumbs=array(
	'试题管理'=>array('index'),
	'管理列表',
);

$this->menu=array(
	array('label'=>'新增试题', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('questions-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'questions-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array(
			'name'=>'questions_title',
			'type'=>'raw',
			'value'=>'CHtml::link(CHtml::encode($data->questions_title), array("view","id"=>"$data->question_id"))',
		),
		array(
			'name'=>'questions_type',
			'value'=>'$data->getQTyptText()',
			//'value'=>$model->questions_type,
			'filter'=>$model->getQTypeOption(),
		),
		/*
		'questions_content',
		'questions_answer',
		'questions_explanation',
		'question_creater_id',
		'questions_create_time',
		'questions_edit_time',
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
